Selecting Values for Activities
The For Each Value activity can dynamically interact with values generated or set in the same workflow definition.
Note: Unless you specify otherwise, all activities that affect a single entry are performed on the entry that starts the workflow.
To select which values an activity will be performed on
- Add the For Each Value activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
- Select the For Each Value activity in the Designer Pane.
- In the Add Value dialog, click
to select the token whose value you want to dynamically interact with, and then click OK to save the value. You must select a token from a Retrieve Field Values activity that retrieved all the values from a multi-value field. For example, if you retrieved the values from a multi-value "Phone" field, you could use the %(RetrieveFieldValues_Phone_All) token. .
- Optional: To edit an existing token selection, select the token and click Edit.... Make the desired changes to the token and click OK.
- Optional: To remove an existing token selection, select the token and click Remove.
- Drag the activity or activities that should be performed for each token value into the Drop Activities Here section.
- Configure the activities you have dragged into the For Each Value activity. If the activity you have selected accepts token information, you can use the current token value of the For Each Value activity within the activity.
Example: Each document routed by your workflow has a list of recipients stored in a "Recipients" field. The field supports multiple values. You use a Retrieve Field Values activity to retrieve all of the values of the field and store it in a token. You could then use the For Each Value activity to retrieve all the values for that token, and perform a Route Entry to User task to route the entry to each person in the "Recipients" field.